<?php
/**
 * @Author: WHK
 * @Date:   2014-10-28 17:46:18
 * @Last Modified by:   Administrator
 * @Last Modified time: 2014-10-28 21:18:30
 */

class CustomModel extends Model
{
	// 指定表
	public $table = 'custom';
	
	/**
	 * [add_添加数据]
	 * @param [type] $data [description]
	 */
	public function add_($data=null)
	{
		return $this->add($data);
	}
	/**
	 * [get_all 获得所有数据]
	 * @return [type] [description]
	 */
	public function get_all($where=null)
	{

		return $this->where($where)->all();
	}
	public function del_($where){

		return $this->where($where)->del();
	}
	public function edit($where,$data)
	{
		return $this->where($where)->save($data);
	}
	public function get_one($where=null){
		return $this->where($where)->find();
	}
}